<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>首页</title>
<meta name="keywords"  content="KEYWORDS..." />
<meta name="description" content="DESCRIPTION..." />
<meta name="author" content="DeathGhost" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name='apple-touch-fullscreen' content='yes'>
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<meta name="format-detection" content="address=no">
<link rel="icon" href="/1/images/icon/favicon.ico" type="image/x-icon">
<link rel="apple-touch-icon-precomposed" sizes="57x57" href="/1/images/icon/apple-touch-icon-57x57-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="/1/images/icon/apple-touch-icon-120x120-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="196x196" href="/1/images/icon/apple-touch-icon-196x196-precomposed.png">
<meta name="viewport" content="initial-scale=1, width=device-width, maximum-scale=1, user-scalable=no">
<link rel="stylesheet" type="text/css" href="/1/css/style.css" />
<script src="/1/js/jquery.js"></script>
<script src="/1/js/swiper.min.js"></script>
    <style>
        #slide{height: auto}
        #slide .swiper-slide{height: auto}
    </style>
</head>
<body>
<!--header-->
<header>
 {{--<a href="/1/location.html" class="location">西安市</a>--}}
 <h1 class="logoIcon" style="font-size:16px;">云淘坊－{{$agent['shop_name']}}</h1>
 <a href="/home/home/search" class="rt_searchIcon">&#37;</a>
</header>
<div style="height:1rem;"></div>
<!--slide-->
<div id="slide">
  <div class="swiper-wrapper">
      @foreach($banners as $val)
          <div class="swiper-slide">
              <a href="{{$val['url']}}">
                  <img src="{{$val['pic']}}" style="height:auto;"/>
              </a>
          </div>
      @endforeach
  </div>
  <div class="pagination"></div>  
</div>
<!--categoryList-->
<ul class="categoryLiIcon">
    @foreach($cateList as $val)
        <li>
            <a href="{{url('goods?cate_id=' . $val['id'])}}">
                <img src="{{$val['pic']}}"/>
                <em>{{$val['name']}}</em>
            </a>
        </li>
    @endforeach
</ul>
<!--Tab:productList-->
<dl class="tab_proList">
    <dt>
        <a href="/" class="{{empty($params['sort']) ? 'currStyle' : ''}}">默认</a>
        <a href="?sort=hot" class="{{request('sort') == 'hot' ? 'currStyle' : ''}}">热销</a>
        <a href="?sort=new" class="{{request('sort') == 'new' ? 'currStyle' : ''}}">新品</a>
    </dt>
 <dd>
  <ul>
      @foreach($goodsList as $val)
          <li>
              <a class="goodsPic" href="/detail?id={{$val['id']}}">
                  <img src="{{preg_replace('/,.*/', '', $val['pic'])}}"/>
              </a>
              <div class="goodsInfor">
                  <h2>
                      <a href="/detail?id={{$val['id']}}">{{$val['name']}}</a>
                  </h2>
                  <p>
                      <del>{{$val['origin_price']}}</del>
                  </p>
                  <p>
                      <strong class="price">{{$val['price']}}</strong>
                  </p>
                  <a class="addToCart" onclick="addCart(this, '{{$val['id']}}')">&#126;</a>
              </div>
          </li>
      @endforeach
  </ul>
 </dd>
</dl>
<!--floatCart-->
@include('home.1.public-cart')
<div style="height:1.2rem;"></div>
@include('home.1.footer')
<script>
    $(document).ready(function(){
        new Swiper('#slide',{
            autoplay:2500,
            visibilityFullFit : true,
            loop:true,
            pagination : '.pagination',
        });

        // 列表tab
        $(".tab_proList dd").eq(0).show().siblings(".tab_proList dd").hide();
    });
</script>
</body>
</html>
